package com.atguigu.day17_1.test03;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;

/**
 * @author fenge
 */
public class Test03 {
    public static void main(String[] args) {
        /*HashMap<String ,String> hashMap = new HashMap<>();
        hashMap.put("浙江省","绍兴市\n" +
                "\t温州市\n" +
                "\t湖州市\n" +
                "\t嘉兴市\n" +
                "\t台州市\n" +
                "\t金华市\n" +
                "\t舟山市\n" +
                "\t衢州市\n" +
                "\t丽水市\n" +
                "\t杭州市\n" +
                "\t宁波市");
        hashMap.put("\n海南省","海口市\n" +
                "\t三亚市");
        hashMap.put("\n北京市","北京市");
        System.out.println(hashMap);*/
        HashMap<String, List<String>> map = new HashMap<>();
        map.put("北京市", Arrays.asList("北京市"));
        map.put("海南省", Arrays.asList("海口市","三亚市"));
        map.put("浙江省", Arrays.asList("绍兴市","温州市","湖州市","嘉兴市","台州市","金华市","舟山市","衢州市","丽水市"));

        Set<Entry<String, List<String>>> entrySet = map.entrySet();
        for (Entry<String, List<String>> object : entrySet) {
            System.out.println(object);
        }

    }
}
